﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using LibrarySolution.ComMethod;
using Microsoft.Reporting.WinForms;

namespace LibrarySolution.Frm.报表
{
    public partial class FrmBb : Form
    {
        private static FrmBb Instance;
        public FrmBb(ReportDataSource Rds,String path,String time)
        {
            InitializeComponent();
            ReportParameter para = new ReportParameter("TxtTime",time);
            reportViewer1.LocalReport.ReportPath = path;
            reportViewer1.LocalReport.SetParameters(para);
            reportViewer1.LocalReport.DataSources.Add(Rds);
            reportViewer1.RefreshReport();
        }
        public static FrmBb GetInstance(ReportDataSource Rds,String path,String time)
        {
            Instance = new FrmBb(Rds,path,time);
            return Instance;
        }

        private void FrmBb_Load(object sender, EventArgs e)
        {
            this.reportViewer1.RefreshReport();
        }
    }
}
